<include file="../Public/head" />

<script>
    $(function(){
        $("select[name=smid]").change(function(){
            document.location=$(this).attr("value");
        })
        $("select[name=place]").change(function(){
            document.location=$(this).attr("value");
        })
        $("select[name=in_id]").change(function(){
            document.location=$(this).attr("value");
        })
        
    })
</script> 
<table width="100%" border="0" cellspacing="0" cellpadding="0">
       <form method="post">
  <include file="../Public/Search" />
       </form>
  <tr>
    <td><table id="subtree1" style="DISPLAY: " width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
          	 <tr>
               <td height="20">
	              </td>
          	 </tr>
              <tr>
                <td height="40" class="font42">
				<table width="100%" border="0" cellpadding="4" cellspacing="1" bgcolor="#464646" class="newfont03">
				 <tr class="CTitle" >
                    	<td height="22" colspan="9" align="center" style="font-size:16px">财务分类详细列表</td>
                  </tr>
                  <tr bgcolor="#EEEEEE">
                      <td width="6%" align="center" height="30">操作id</td>
                      <td width="6%" align="center" height="30">操作账户
                          <select name="smid">
                              <assign name="url" value="$array" />
                              <option <php>unset($url[smid])</php> value="{:U('',$url)}">全部</option>
                              <option <assign name="url.smid" value="0" /> value="{:U('',$url)}" <if condition="$smid===0">selected</if> >无</option>
                              <foreach name="member" item="vo1">
                                <option <assign name="url.smid" value="$vo1.id" /> value="{:U('',$url)}" <if condition="$vo1[id] eq $smid">selected</if> >{$vo1.name}</option>
                              </foreach>
                          </select>
                      </td>
                    <td width="10%" align="center" height="30">操作类型
                        <select name="place">
                            <assign name="url" value="$array" />
                            <option <php>unset($url[place])</php> value="{:U('',$url)}" >全部</option>
                            <option <assign name="url.place" value="1" /> value="{:U('',$url)}" <if condition="$place==1">selected</if> >增加</option>
                            <option <assign name="url.place" value="2" /> value="{:U('',$url)}" <if condition="$place==2">selected</if> >转账</option>
                            <option <assign name="url.place" value="3" /> value="{:U('',$url)}" <if condition="$place==3">selected</if> >消费</option>
                        </select>
                    </td>
                    <td width="15%" align="center" height="30">备注</td>
                    <td width="10%">转出账户</td>
                    <td width="10%">转入账户
                        <select name="in_id">
                              <assign name="url" value="$array" />
                              <option <php>unset($url[in_id])</php> value="{:U('',$url)}">全部</option>
                              <foreach name="sort" item="vo1">
                                <option <assign name="url.in_id" value="$vo1.sid" /> value="{:U('',$url)}" <if condition="$vo1.sid eq $in_id">selected</if> >{$vo1.name}</option>
                              </foreach>
                          </select>
                    </td>
                    <td width="10%">金额</td>
                    <td width="10%">操作日期</td>
                    <td width="12%">管理</td>
                  </tr>
                  <foreach name="list" item="vo">
                      <tr bgcolor="#FFFFFF" rel="{$vo.sid}" class="fsort">
                          <td align="center">{$vo.id}</td>
                          <td align="center">{$vo.sm_name|default="无"}</td>
                          <td width="15%" align="center" height="30">
                              <switch name="vo.place">
                                <case value="1">增加</case>
                                <case value="2">转账</case>
                                <case value="3">支出</case>
                                <default />
                            </switch>
                        </td>
                        <td width="15%" align="center" height="30">{$vo.content}</td>
                        <td width="10%">{$vo.exp_name}({$vo.exp_old}-{$vo.exp_new})</td>
                        <td width="10%">{$vo.in_name}({$vo.in_old}-{$vo.in_new})</td>
                        <td width="10%"><span <if condition="(($vo.in_place eq 0) and ($vo.place eq 1))">style="color:#000"<elseif condition="(($vo.in_place eq 1) and ($vo.place eq 1)) or ($vo.place eq 3)" />style="color:#f00"<else /></if>>{$vo.number|sprintf="%.2f",###}</span></td>
                        <td width="10%">{$vo.time|date="Y-m-d",###}</td>
                        <td width="12%"><a href="{:U('edit',array('id'=>$vo['id']))}">修改</a>|<a href="{:U('del',array('id'=>$vo['id']))}" onclick="return confirm('确认删除财务记录么？删除后将无法恢复')">删除</a></td>
                      </tr>
                  </foreach>	  
				  
				  
				 
            </table></td>
        </tr>
      </table>
      <include file="../Public/page" />
          </td>
        </tr>
      </table></td>
  </tr>
</table>     





<include file="../Public/foot" />